home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Environments
/
PowerMacOberon feb96
/
Text
/
Balloon.Text
(
.txt
)
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Oberon Text
|
1996-01-16
|
98.2 KB
|
1,852 lines
|
[
TEXT/.Ob4
]
Syntax10.Scn.Fnt
Syntax10i.Scn.Fnt
KeplerElems
Alloc
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
LineDesc
Kepler1
AttrDesc
KeplerFrames
CaptionDesc
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Syntax8.Scn.Fnt
Syntax8.Scn.Fnt
Syntax10.Scn.Fnt
Syntax8.Scn.Fnt
height
Syntax8.Scn.Fnt
Syntax8.Scn.Fnt
Times10.Scn.Fnt
Courier10.Scn.Fnt
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
RectangleDesc
KeplerFrames
CaptionDesc
Syntax10.Scn.Fnt
viewer
Syntax10.Scn.Fnt
Viewer
Syntax10.Scn.Fnt
Frame
Syntax10.Scn.Fnt
Frame
Syntax10.Scn.Fnt
Kepler1
AttrDesc
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
menuF
Syntax10.Scn.Fnt
mainF
Syntax10.Scn.Fnt
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
RectangleDesc
KeplerFrames
CaptionDesc
Menu frame
Syntax10.Scn.Fnt
Main frame
Syntax10.Scn.Fnt
Kepler1
LineDesc
Kepler1
AttrDesc
menuH
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
(V.X, V.Y)
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
RectangleDesc
KeplerFrames
CaptionDesc
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
F.X, F.Y
Syntax10.Scn.Fnt
Kepler1
AttrDesc
dY = 0
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
RectangleDesc
KeplerFrames
CaptionDesc
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
F.X, F.Y
Syntax10.Scn.Fnt
Kepler1
AttrDesc
dY > 0
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Kepler1
LineDesc
Syntax10.Scn.Fnt
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
RectangleDesc
KeplerFrames
CaptionDesc
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
F.X, F.Y
Syntax10.Scn.Fnt
Kepler1
AttrDesc
dY = 0
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
RectangleDesc
KeplerFrames
CaptionDesc
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
F.X, F.Y
Syntax10.Scn.Fnt
Kepler1
AttrDesc
dY > 0
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Syntax10.Scn.Fnt
Kepler1
LineDesc
Syntax10.Scn.Fnt
KeplerGraphs
GraphDesc
KeplerGraphs
StarDesc
Kepler1
AttrDesc
Kepler1
RectangleDesc
Kepler1
TextureDesc
KeplerFrames
CaptionDesc
filler viewers
Syntax10.Scn.Fnt
viewers
Syntax10.Scn.Fnt
track 1
Syntax10.Scn.Fnt
track 2
Syntax10.Scn.Fnt
TableElems
Alloc
Syntax10.Scn.Fnt
/table
id X Y W H state
Restore display in old boundary restore - - - - -
Change at bottom modify - new Y - new H -
Viewer will be closed suspend - - - - 0
Viewer will be overlaid suspend - - - - -v.state
"Dialog"
The commando module of Oberon Dialogs -
A graphical user interface for the Oberon system.
"DialogFrames"
This module implements dialog frames containing a dialog panel.
They can be installed in viewers.
"Dialogs"
A module defining the abstract class Object which is the base class of
dialog items such as button or check boxes. It also defines the class Planel
which is a collection of dialog items. Panels are shown in dialog frames.
Together with the modules Dialog and DialogFrames it defines the
package Oberon Dialogs - A grahical user interface for the Oberon system.
"Directories"
Module Directories provides a portable interface to directory services.
"Directories.alreadyExists"
Value of res if the directory already exists.
"Directories.badName"
Value of res if the specified file- or directory-name was bad.
"Directories.delete"
Value of op in the notifier procedure indicating deletion of the item.
"Directories.delimiter"
Character used to delimit path names.
"Directories.dirInUse"
Value of res if the specified directory was in use or not empty.
"Directories.insert"
Value of op in the notifier procedure indicating insertion of the item.
"Directories.mediumFull"
Value of res if the disk or directory is full.
"Directories.mediumLocked"
Value of res if there is a hardware or software lock and access is prohibited.
"Directories.noErr"
Value of res if the operation was successful.
"Directories.notADir"
Value of res if the specified name did not specify a directory.
"Directories.otherError"
Value of res if the operation was not successful and the error cannot be further specified.
"Directories.Directory"
Directory = POINTER TO DirectoryDesc;
DirectoryDesc = RECORD path: ARRAY 128 OF CHAR END;
Directory structure containing the path name of the directory.
"Directories.DirectoryDesc"
DirectoryDesc = RECORD path: ARRAY 128 OF CHAR END;
Directory structure containing the path name of the directory.
"Directories.Entry"
Entry = POINTER TO EntryDesc;
EntryDesc = RECORD
dir: Directory;
name: ARRAY 32 OF CHAR;
hostname: ARRAY 14 OF CHAR
Data structure used to represent an entry in the directory, hostname is the name
under which the Oberon-file is stored on the disk (8.3 characters). This data structure
is used to perform the mapping of the file names and should not be used.
"Directories.EntryDesc"
EntryDesc = RECORD
dir: Directory;
name: ARRAY 32 OF CHAR;
hostname: ARRAY 14 OF CHAR
Data structure used to represent an entry in the directory, hostname is the name
under which the Oberon-file is stored on the disk (8.3 characters). This data structure
is used to perform the mapping of the file names and should not be used.
"Directories.FileProc"
FileProc = PROCEDURE (d: Directory; name: ARRAY OF CHAR; isDir: BOOLEAN;
VAR continue: BOOLEAN);
Type of callback procedures for enumerating the entries in the specified directory d.
name is the name of the directory entry. isDir is TRUE if the entry is a directory.
continue can be set to FALSE in order to end the enumeration process.
Enumeration process is initiated by a call of Directories.Enumerate.
"Directories.Notifier"
Notifier = PROCEDURE (op: INTEGER; path, name: ARRAY OF CHAR);
Type of callback procedures that are called when directory entries are deleted or inserted.
op indicates the kind of operation (Directories.insert or Directories.delete),
path and name specify the inserted or deleted entry.
"Directories.PathProc"
PathProc = PROCEDURE (path: ARRAY OF CHAR; VAR continue: BOOLEAN);
Type of callback procedures for enumerating the search paths.
path is the name of the search path.
continue can be set to FALSE in order to end the enumeration process.
Enumeration process is initiated by a call of Directories.EnumeratePaths.
"Directories.notify"
Procedure variable, is called whenever a directory entry is deleted or inserted, can be
"Directories.res"
Indicates the success of the last operation.
"Directories.Change"
PROCEDURE Change (path: ARRAY OF CHAR) changes the current working directory to
the specified directory.
"Directories.Create"
PROCEDURE Create (path: ARRAY OF CHAR) creates the specified directory.
"Directories.Current"
PROCEDURE Current (): Directory returns a directory structure denoting the
current working directory.
"Directories.Delete"
PROCEDURE Delete (path: ARRAY OF CHAR) deletes the specified directory.
"Directories.DeleteFile"
PROCEDURE DeleteFile (dir: Directory; VAR name: ARRAY OF CHAR) used to
physically delete the file name in the directory dir. Should not be used (only used in
Module Files).
"Directories.Enumerate"
PROCEDURE Enumerate (D: Directory; H: FileProc) calls fileProc for each entry
in the specified directory.
"Directories.EnumeratePaths"
PROCEDURE EnumeratePaths (proc: PathProc) calls pathProc for each search path.
"Directories.Exists"
PROCEDURE Exists (dir: Directory; VAR hostname: ARRAY OF CHAR): BOOLEAN
returns TRUE if the file hostname exists in the directory dir.
"Directories.GetHostname"
PROCEDURE GetHostname (dir: Directory; name: ARRAY OF CHAR;
VAR hostname: ARRAY OF CHAR) returns the hostname under which the file name is
stored in the directory dir.
"Directories.InsertEntry"
PROCEDURE InsertEntry (D: Directory; e: Entry) inserts the entry e in the data structure
maintained to perform the mapping of 8.3 to long file names and should not be used.
"Directories.Map"
PROCEDURE Map (VAR name, hostname: ARRAY OF CHAR) maps the long file name
name to the hostname (8.3). Should not be used (only used in Module Files).
"Directories.NextMapping"
PROCEDURE NextMapping (this: ARRAY OF CHAR; VAR next: ARRAY OF CHAR) generates
the next possible mapping of the long file name this to next (8.3). Should not be used (only
used in Module Files). The mapping next can also already exist in the directory.
"Directories.RemoveEntry"
PROCEDURE RemoveEntry (D: Directory; e: Entry) removes the entry e from the data structure
maintained to perform the mapping of 8.3 to long file names and should not be used.
"Directories.Rename"
PROCEDURE Rename (oldPath, newPath: ARRAY OF CHAR) renames the
directory oldPath to newPath.
"Directories.RenameEntry"
PROCEDURE RenameEntry (e: Entry; VAR new: ARRAY OF CHAR) renames the entry e
in the data structure maintained to perform the mapping of 8.3 to long file names
and should not be used.
"Directories.Startup"
PROCEDURE Startup (): Directory returns a directory structure denoting the
current working directory.
"Directories.This"
PROCEDURE This (path: ARRAY OF CHAR): Directory returns a directory structure
denoting the specified directory.
"Directories.ThisEntry"
PROCEDURE ThisEntry (D: Directory; VAR name: ARRAY OF CHAR): Entry returns the
entry corresponding to the specified long file name name within the directory D.
Should not be used (only used in Module Files).
"Directories.ThisHostEntry"
PROCEDURE ThisHostEntry (D: Directory; VAR hostname: ARRAY OF CHAR): Entry
returns the entry corresponding to the specified (8.3) file name hostname within the directory D.
Should not be used (only used in Module Files).
"Display"
Module Display provides types, variables, and procedures for screen handling.
"Display.black"
CONST black = 0 is the background color of the screen.
"Display.white"
CONST white = 15 is the foreground color of the screen.
"Display.invert"
CONST invert = 2 is the invert mode of raster operations.
"Display.paint"
CONST paint = 1 is the paint mode of raster operations.
"Display.replace"
CONST replace = 0 is the replace mode of raster operations.
"Display.Font"
Font = POINTER TO Bytes is the pointer to a collection of
character patterns.
"Display.Byte"
Byte = RECORD END
"Display.Frame"
Frame = POINTER TO FrameDesc
"Display.FrameDesc"
A rectangle input/output area on the screen.
FrameDesc = RECORD
dsc, next: Frame; (* dec: first subframe; next: next sibling frame *)
X, Y: INTEGER; (* absolute coordinates of the lower left corner of
the frame's rectangle *)
W, H: INTEGER; (* widht and height of the frame *)
handle: Handler; (* procedure which handles message sent to the frame *)
END ;
"Display.FrameMsg"
FrameMsg = RECORD END is the base type of the messages
which can be sent to a frame.
"Display.Handler"
Message interpreter to be installed in a frame.
Handler = PROCEDURE (f: Frame; VAR msg: FrameMsg);
"Display.Pattern"
TYPE Pattern = LONGINT is a program-defined pixel map.
"Display.Botton"
VAR Botton: INTEGER is the bottom y coordinate of primary display.
"Display.UBotton"
VAR UBotton: INTEGER is the bottom y coordinate of secondary display.
"Display.ColLeft"
VAR ColLeft: INTEGER is the left x coordinate of color display.
"Display.Left"
VAR Left: INTEGER is the left x coordinate of monochrome display.
"Display.Height"
VAR Height: INTEGER is the height of a displayable region.
"Display.Width"
VAR Width: INTEGER is the width of a displayable region.
"Display.Unit"
VAR Unit: LONGINT is the size of a screen pixel in units of 1/36.
"Display.arrow"
VAR arrow: Pattern is the pattern of the mouse curser.
"Display.cross"
VAR cross: Pattern is the pattern of the graphic curser.
"Display.downArrow"
VAR downArrow: Pattern is the pattern of the busy signal.
"Display.grey0"
VAR grey0: Pattern is the first shade of grey.
"Display.grey1"
VAR grey1: Pattern is the second shade of grey.
"Display.grey2"
VAR grey2: Pattern is a chessboard of 2 by 2 pixel squares.
"Display.hook"
VAR hook: Pattern is the pattern of the caret.
"Display.star"
VAR star: Pattern is the pattern of the star-shaped pointer.
"Display.ticks"
VAR ticks: Pattern is the pattern with square lattice of 16 pixels.
"Display.CopyBlock"
CopyBlock (sx, sy, w, h, dx, dy, mode: INTEGER) copies a rectangle screen
area (sx, sy, w, h) to an area of the same size with the lower left corner
at position dx, dy. Source and destination areas may overlap.
"Display.CopyBlockC"
CopyBlockC (F: Frame; sx, sy, w, h, dx, dy, mode: INTEGER) is similar to
CopyBlock but clip the output against frame F.
"Display.CopyPattern"
CopyPattern (col: INTEGER; pat: LONGINT; x, y, mode: INTEGER) copies
the pattern pat to the screen such that its lower left corner has
coordinates x, y. The color and mode of the copied pattern are
determined by col and mode.
"Display.CopyPatterC"
CopyPatternC (F: Frame; col: INTEGER; pat: LONGINT; x, y, mode: INTEGER)
is similar to CopyPattern but clip the output against frame F.
"Display.Dot"
Dot (col, x, y, mode: INTEGER) draws a dot at the position x, y with the
color col and mode mode.
"Display.DotC"
DotC (F: Frame; col, x, y, mode: INTEGER) is similar to Dot but clip
the output against frame F.
"Display.GetChar"
GetChar (f: Font; ch: CHAR; VAR dx, x, y, w, h: INTEGER; VAR p: LONGINT)
provides the pattern p of character ch in font f. The pattern is of minimal
extent. dx denotes the distance to the next character, w and h are the
width and height of the pattern and x, y represent the offset from a
reference point on the base line of a text.
"Display.GetColor"
GetColor (col: INTEGER; VAR red, green, blue: INTEGER) returns the
intensity values red, blue, green of the color number col. If col < 0,
the intensities of the color used for the cursor are provided.
"Display.Map"
Map (x: INTEGER): LONGINT returns the base address of the pixel map
containing the coordinate x.
"Display.NewPattern"
NewPattern (VAR image: ARRAY OF SET; w, h: INTEGER): LONGINT returns
a new pattern with contents image and size w, h.
"Display.ReplConst"
ReplConst (col, x, y, w, h, mode: INTEGER) replicates color col over the
destination x, y, w, h in the specified mode. In the case of a monochrome
screen, col = 0 represents the background color whereas col > 0 maps into
the inverse of the background.
"Display.ReplConstC"
ReplConstC (F: Frame; col, x, y, w, h, mode: INTEGER) is similar to
ReplConst but clip the output against frame F.
"Display.ReplPattern"
ReplPattern (col: INTEGER; pat: LONGINT; x, y, w, h, mode: INTEGER)
replicates the source pattern pat over the destination x, y, w, h in
color and mode specified by the parameters col and mode. On a
monochrome screen, col is ignored.
"Display.ReplPatternC"
ReplPatternC (F: Frame; col: INTEGER; pat: LONGINT; x, y, w, h, xp, yp, mode: INTEGER)
is similar to ReplPattern but clip the output against frame F.
"Display.SetColor"
SetColor (col, red, green, blue: INTEGER) defines the hue associated
with color col which is mixed from the primary colors red, green and blue.
IF col < 0, the operation applies to the color in which the cursor is displayed.
"Display.SetMode"
SetMode (x: INTEGER; s: SET) determines the mode of operations of the
screen covering coordinate x. For a monochrome screen
(Left <= x < Left + Width), the control register s contains the following
mode elements:
0 IN s means 'primary map is displayed'
1 IN s means 'secondary map is displayed'
2 IN s means 'display is in reverse mode'
For a color screen (ColLeft <= x < ColLeft + Width), only bit 0 is available.
"Display1"
Module Display1 provides simple graphic routines and procedures for
handling patterns.
"Display1.Circle"
Circle (F: Display.Frame; col, x, y, r, mode: INTEGER) draws a circle width the
color col on the screen at the position x, y and radius r. mode specifies the
mode of the operation. The output is clipped against frame F.
"Display1.Ellipse"
Ellipse (F: Display.Frame; col, x, y, a, b, mode: INTEGER) draws
an ellipse with the color col on the screen at the position x, y
and the radiuses a and b. mode specifies the mode of the
operation. The output is clipped against frame F.
"Display1.GetPatternSize"
GetPatternSize (pat: LONGINT; VAR w, h: INTEGER) returns the
width and height of the specified pattern pat.
"Display1.Line"
Line (F: Display.Frame; col, x0, y0, x1, y1, mode: INTEGER) draws
a line with the color col from x0, y0 to x1, y1. mode specifies the mode
of the operation. The output is clipped against frame F.
"Display1.NewPattern"
NewPattern (VAR image: ARRAY OF SET; w, h: INTEGER): LONGINT
retruns a new pattern with the image specified in image and
the width w and height h.
"Display1.ThisPattern"
ThisPattern (n: INTEGER): LONGINT returns the pattern which
is associated with the parameter n.
"Files"
Module Files privides procedures to work with files (sequence of bytes
stored on disk).
"Files.File"
A file represents a stream of bytes usually stored on an external medium.
It has a certain length as well as the date and time of its last modification.
"Directory"
A file directory is a mapping from file names to files. A file that is not
registered in the directory is considered temporary.
"Files.Rider"
TYPE Rider = RECORD eof: BOOLEAN; res: LONGINT END;
A rider is a read/write position in a file (positions start with 0). There
may be multiple riders set to the same file. The field eof is set to TRUE
if an attempt was made to read beyond the end of the file. The field
res reports the success of ReadBytes and WriteBytes operations. Writing
data overwrites old data at the rider position. When data is written
beyond the end of the file, the file length increases.
"Files.Old"
Old (fn) searches the name fn in the directory and returns the corrsponding
file. If the name is not found, it returns NIL.
"Files.New"
New (fn) creates and returns a new file. The name fn is remembered for the
later use of the operation Register. Unless Register is called, the file is not
entered into the directory.
"Files.Register"
Register (f) enters the file f into the directory together with the name
specified in the operation New that created f. The file buffers are written
to the disk. Any existing mapping of this name to another file is overwritten.
"Files.Close"
Close (f) writes back the file buffers of f. The file is still accessible by its handle
f and the riders positioned on it. Unless a file is modified it is not necessary
to close it.
"Files.Purge"
Purge (f) resets the length of file f to 0.
"Files.Delete"
Delete (fn, res) removes the directory entry for the file fn without deleting the
file. If res = 0 the file has been successfully deleted. If there are variables
referring to the file while Delete is called, they can still be used (e.g., to
register the file again by a call to Register).
"Files.Rename"
Rename (oldfn, newfn, res) renames the directory entry oldfn to newfn.
If res = 0 the file has been successfully renamed. If there are variables
referring to the file while Rename is called, they can still be used (e.g., to
register the file under its old name again by a call to Register).
"Files.Length"
Length (f) returns the number of bytes in file f.
"Files.GetDate"
GetDate (f, t, d) returns the time t and date d of the last modification of
file f. The encoding is: hour = t DIV 4096; minute = t DIV 64 MOD 64;
second = t MOD 64; year = d DIV 512; month = d DIV 32 MOD 16;
day = d MOD 32.
"Files.Set"
Set(r, f, pos) sets the rider r to position pos in file f. The field r.eof is set
to FALSE. The operation requires that 0 <= pos < Length(f).
"Files.Pos"
Pos(r) returns the position of the rider r.
"Files.Base"
Base(r) returns the file to which the rider r has been set.
"Files.Read"
Read(r, x) reads the next byte x from rider r and advances r accordingly.
"Files.ReadInt"
ReadInt(r, i) reads an integer number i from rider r and advances r
accordingly.
"Files.ReadLInt"
ReadLInt(r, i) reads a long integer number i from rider r and advances
r accordingly.
"Files.ReadReal"
ReadReal(r, x) reads a real number x from rider r and advances r
accordingly.
"Files.ReadLReal"
ReadLReal(r, x) reads a long real number x from rider r and advances
r accordingly.
"Files.ReadNum"
ReadNum(r, i) reads an integer i from rider r and advances r
accordingly. The number i is compactly encoded.
"Files.ReadString"
ReadString(r, s) reads a sequence of characters (including the terminating
0X) from rider r and returns it in s. The rider is advanced accordingly. The
actual parameter corresponding to s must be long enough to hold the
character sequence plus the terminating 0X.
"Files.ReadSet"
ReadSet(r, s) reads the set s from rider r and advances r accordingly.
"Files.ReadBool"
ReadBool(r, b) reads a Boolean value b from rider r and advances r
accordingly.
"Files.ReadBytes"
ReadBytes(r, buf, n) reads n bytes into buffer buf starting at the rider
position r. The rider is advanced accordingly. If less than n bytes could
be read, r.res contains the number of requested but unread bytes.
"Files.Write"
Write(r, x) writes the byte x to rider r and advances r accordingly.
"Files.WriteInt"
WriteInt(r, i) writes the integer number i to rider r and advances r
accordingly.
"Files.WriteLInt"
WriteLInt(r, i) writes the long integer number i to rider r and advances
r accordingly.
"Files.WriteReal"
WriteReal(r, x) writes the real number x to rider r and advances r
accordingly.
"Files.WriteLReal"
WriteLReal(r, x) writes the long real number x to rider r and advances
r accordingly.
"Files.WriteNum"
WriteNum(r, i) writes the integer i to rider r and advances r
accordingly. The number i is compactly encoded.
"Files.WriteString"
WriteString(r, s) writes the sequence of characters s (including the
terminating 0X) to rider r and advances r accordingly.
"Files.WriteSet"
WriteSet(r, s) writes the set s to rider r and advances r accordingly.
"Files.WriteBool"
WriteBool(r, b) writes the Boolean value b to rider r and advances r
accordingly.
"Files.WriteBytes"
WriteBytes(r, buf, n) writes the first n bytes from buf to rider r and
advances r accordingly. r.res contains the number of bytes that could
not be written (e.g., due to a disk full error).
"Fonts"
Module Fonts exports the abstract data type Font, which provides the
raster data for screen fonts.
"Fonts.Font"
POINTER TO FontDesc
"Fonts.FontDesc"
Describes a Font.
FontDesc = RECORD
name: Name; (* name of the font *)
height: INTEGER; (* the minimum distance between text lines *)
minX, maxX, minY, maxY: INTEGER; (* the extremal values of the box *)
raster: Display.Font (* the set of patterns used in porcedure Display.GetChar *)
"Fonst.Name"
TYPE Name: ARRAY 32 OF CHAR defines the name of the font.
"Fonts.Default"
VAR Default: Font contains the default font.
"Fonts.This"
This (name: ARRAY OF CHAR): Font returns the font with the the given name.
If the font does not exits, the default font is returned.
Name convention:
FontName := family size style '.Scn.Fnt'.
family := 'Syntax' | 'Times' | 'Helvetica' | 'Geneva' | 'Palatino'
| 'Courier' | ...
size := '8' | '10' | '12' | '14' | '18' | '20' | ...
style := italic | bold | plain.
italic := 'i'.
bold := 'b'.
plain := ''.
Module In provides a set of basic routines for formatted input of
characters, character sequences, numbers, and names. It assumes a
standard input stream with a current position that can be reset.
Usually the input stream is the text immediately following the most
recently invoked command. If this text starts with the character ^
the current position is set to the beginning of the most recent
selection (if no selection exists, Done is set to FALSE). If the text
starts with the character * the current position is set to the
beginning of the text in the marked viewer (if no viewer is marked,
Done is set to FALSE). The end of the input stream is the end of the
text containing the current position.
"In.Done"
Indicates the success of an input operation. If Done is TRUE after an
input operation, the operation was successful and its result is valid.
An unsuccessful input operation sets Done to FALSE; it remains FALSE
until the next call to Open or OpenText. In particular, Done is set to
FALSE if an attempt is made to read beyond the end of the input stream.
"In.Open"
Open (re)sets the current position to the beginning of the input stream.
Done indicates if the operation was successful.
"In.OpenText"
OpenText(t, pos) sets the current position to pos in the text t. Done
indicates if the operation was successful.
"In.Next"
Next() returns the code of the next symbol in the input stream (inval,
name, string, int, real, longReal, char) without changing the current
position. It there is no next symbol, Next returns inval.
"In.Char"
Char(ch) returns the character ch at the current position. Char does
not skip leading blanks, tabs or end-of-line characters. When called
immediately after Open you usually like to skip leading blanks
which is typically done in a loop.
"In.Int"
Int(n: INTEGER) returns the integer constant n at the current position
according to the format: IntConst = digit {digit} | digit {hexDigit} 'H'.)
"In.LongInt"
LongInt(n: LONGINT) returns the integer constant n at the current position
according to the format: IntConst = digit {digit} | digit {hexDigit} 'H'.)
"In.Real"
Real(r) returns the real constant r at the current position according to the
format: RealConst = digit {digit} ['.' {digit} ['E' ('+' | '-') digit {digit}]].
"In.LongReal"
LongReal(r) returns the long real constant r at the current position according
to the format:
LongRealConst = digit {digit} ['.' {digit} [('D' | 'E') ('+' | '-') digit {digit}]].
"In.String"
String(s) returns the string s at the current position according to the format:
StringConst = DQ char {char} DQ. DQ is the double-quote. The string must
not contain characters less than blank.
"In.Name"
Name(s) returns the name s at the current position according to the file name
format of the underlying Oberon system.
"In.inval"
inval = 0, code of the next symbol in the input stream.
"In.name"
name = 1, code of the next symbol in the input stream.
"In.string"
string = 2, code of the next symbol in the input stream.
"In.int"
int = 3, code of the next symbol in the input stream.
"In.real"
real = 4, code of the next symbol in the input stream.
"In.longReal"
longReal = 5, code of the next symbol in the input stream.
"In.char"
char = 6, code of the next symbol in the input stream.
"Input"
Module Input provides facilities to access the mouse,
the keyboard, and the clock.
"Input.TimeUnit"
VAR TimeUnit-: INTEGER
TimeUnit specifies the time resolution.
"Input.Available"
Availabel() returns the number of characters in the keyboard buffer.
Keyboard buffer is a queue of characters typed in from the keyboard.
"Input.Read"
Read (VAR ch: CHAR) returns (and removes) the next character from
the keyboard buffer. If the buffer is empty, Read waits until a key is
pressed.
"Input.Mouse"
Mouse (VAR keys: SET; VAR x, y: INTEGER) returns the current mouse
position (x, y) in pixels relative to the lower left corner of the screen.
keys is the set of the currently pressed mouse keys (left key = 2, middle
key = 1, right key = 0).
"Input.SetMouseLimits"
SetMouseLimits (w, h: INTEGER) defines the rectangle where the mouse
moves (in pixels). Subsequent calls to the operation Mouse will return
x coordinates in the range 0..w-1 and y coordinates in the range 0..h-1.
"Input.Time"
Time() returns the time elapsed since system startup in units of size
1/TimeUnit seconds.
"MenuViewers"
Viewers of type MenuViewers.Viewer are the standard Oberon viewers with
two active subframes: menu frame and main frame.
"MenuViewers.Viewer"
Viewer = POINTER TO ViewerDesc;
ViewerDesc = RECORD (Viewers.ViewerDesc)
menuH: INTEGER
menuH is the maximal height of the menu frame.
Following you see the logical frame structure and the frame geometry:
The following relations hold between a menu viewer V with menu frame menuF
and main frame mainF:
V IS Viewer menuF = V.dsc mainF = V.dsc.next
The following relations hold: mainF.H + menuF.H = V.H - 2 and
mainF.W = menuF.W = V.W - 2
"MenuViewers.Ancestor"
Is the current menu viewer.
"MenuViewers.New"
New (Menu, Main: Display.Frame; menuH, X, Y: INTEGER): Viewer;
Creates an instance of a menu viewer and displays it on the screen. Menu and Main
are active objects (i.e., they have a handler) extending type Display.Frame which
react properly to messages of type ModifyMsg. Parameter menuH designates the
height of the menu frame.
The menu viewer will open such that its top edge contains the point with coordinates
X, Y provided this results in a viewer of the minimal height is opened.
"MenuViewers.reduce"
Value of the id of a ModifyMsg in order to shrink a frame (reduce = 0). For a reduce
message you have to consider two cases: If dY = 0, then the area reduces at the
bottom. If dY > 0, the frame is both reduced and shifted downwards by an amount
"MenuViewers.extend"
Value of the id of a ModifyMsg in order to expand a frame (extend = 1). For an
extend message you have to consider two cases: If dY = 0, then the area extends
at the bottom. If dY > 0, the frame is both extended and shifted upwareds by an
amount dY.
"MenuViewers.ModifyMsg"
Sent to a frame in order to change its size.
ModifyMsg = RECORD (Display.FrameMsg)
id: INTEGER; (* 0 = reduce, 1 = extend *)
dy: INTEGER; (* dY >= 0 *)
Y, H: INTEGER
dY is the translation, Y is the new value of the y coordinate of the lower left corner of
the frame.
H is the new height of the frame.
"MenuViewers.Handle"
Handle (V: Display.Frame; VAR M: Display.FrameMsg) processes the following
messages: track, viewer, mark.
If the track message (see Oberon.InputMsg) reports a 'shift title bar' command, the
viewer will be changed at the top.
The handler adjusts the viewer in response to messages of type Viewers.ViewerMsg
(restore or modify).
The star-shaped pointer is set in response to a message M of type Oberon.ControlMsg
with M.id = Oberon.mark.
"Modules"
Module Modules offers possibilites to administrate the list of modules loaded by the Oberon System.
"Modules.Command"
Command = PROCEDURE
The type of an Oberon commando.
"Modules.CommandName"
The type of the name of an Oberon commando.
"Modules.CommandPtr"
CommandPtr = POINTER TO CommandDesc
This type defines an Oberon commando with name name.
Its position in the Obj.File is determined by offset.
"Modules.CommandDesc"
CommandDesc = RECORD
name-: CommandName;
offset-: INTEGER;
see Modules.CommandPtr
"Modules.Module"
Module = POINTER TO ModuleDescriptor;
This type defines an Oberon module with name name.
The other properties are only for internal use and system dependent.
"Modules.ModuleDescriptor"
ModuleDescriptor = RECORD
name-: ModuleName;
..... (* internal use only *)
see Modules.Module
"Modules.ModuleName"
The type of the name of an Oberon module.
"Modules.Free"
Free (name: ARRAY OF CHAR; all: BOOLEAN) unloads the module with name name.
IF all then imported modules are also unloaded.
"Modules.ThisCommand"
ThisCommand (mod: Module"; name: ARRAY OF CHAR): Command returns the
command specified by mod and name.
"Modules.ThisMod"
ThisMod (name: ARRAY OF CHAR): Module returns the module specified by name.
The module is loaded if this is not already done.
"Oberon"
Offers some high level functionality not really belonging to one single
lowlevel module (e.g. partitioning of screen, background tasks, mouse
cursor, ...).
"Oberon.AllocateSystemViewer"
AllocateSystemViewer (dx: INTEGER; VAR x, y: INTEGER) yields a proposal
coordinates x and y to be used to open a new viewer in the system
track of
the display containing dx. In most cases it is appropriate to provide
Oberon.Mouse.x for dx.
"Oberon.AllocateUserViewer"
AllocateUserViewer (dx: INTEGER; VAR x, y: INTEGER) yields a proposal
coordinates x and y to be used to open a new viewer in the user
track of
the display containing dx. In most cases it is appropriate to provide
Oberon.Mouse.x for dx.
"Oberon.Call"
Call (VAR name: ARRAY OF CHAR; par: ParList; new: BOOLEAN; VAR res: INTEGER)
calls a procedure given by its name (e.g. Edit.Open). If the corresponding
modules ist not in memory, it is loaded first. If new is TRUE, the system always
reloads the module containing the command. In par the desired parameters
for the command name can be passed. res will contain 0 if the call was
successfull, otherwise an error code.
"Oberon.Collect"
Collect (count: INTEGER) sets the Garbage Collector counter to count.
default value is 20. It defines the number of input events between two
runs of the garbage collector.
"Oberon.DisplayHeight"
DisplayHeight (x: INTEGER) returns the display height
of the display which
contains the x-coordinate x.
"Oberon.DisplayWidth"
DisplayWidth (x: INTEGER) returns the display width
of the display which
contains the x-coordinate x.
"Oberon.DrawCursor"
DrawCursor (c, m, x, y) draws the mouse cursor c at position (x, y) with
the help of m.marker.Draw. If the cursor was positioned elsewhere, the
old cursor is removed with m.marker.Fade. Was the cursor already visible,
it is erased with help of the old marker used to draw it.
"Oberon.FadeCursor"
FadeCursor (VAR c: Cursor) hides the cursor from the display.
"Oberon.GetClock"
GetClock (VAR t, d: LONGINT) returns the current day and time.
"Oberon.GetSelection"
GetSelection (VAR text: Texts.Text; VAR beg, end: LONGINT; VAR time: LONGINT)
Looks for the most recent selection. It is the stretch [beg, end[ in the text
text. The time when the selection has been made is returned in time. If no
selection has been found, time will be less than zero.
"Oberon.Install"
Install (T: Task) installs a new background task
to be activated if no
command is active.
"Oberon.Loop"
Standard Oberon loop dispatching events. Should never be called.
"Oberon.MarkedViewer"
MarkedViewer (): Viewers.Viewer returns the viewer
currently marked with
the star shaped cursor.
"Oberon.OpenCursor"
OpenCursor (VAR c: Cursor) initalises a new cursor.
"Oberon.OpenDisplay"
OpenDisplay (UW, SW, H: INTEGER) opens a new display with two tracks with
respecting widths UW (user track) and SW (system track) and the height H.
"Oberon.OpenTrack"
OpenTrack (x, w: INTEGER) opens a new track
on display with left border x and width w.
"Oberon.PassFocus"
PassFocus (v: Viewers.Viewer) switchs the current focus viewer by sending
a defocus message to the previous one, followed by a focus message to v.
The global variable FocusViewer is set accordingly.
"Oberon.Remove"
Remove (T: Task) removes background task
installed previously with
Oberon.Install.
"Oberon.RemoveMarks"
RemoveMarks (x, y, w, h: INTEGER) removes the cursor
and the star if located
within the given rectangle.
"Oberon.SetClock"
SetClock (t, d: LONGINT) sets the current day and time.
"Oberon.SetColor"
SetColor (col: SHORTINT) sets color of characters read from keyboard.
"Oberon.SetFont"
SetFont (fnt: Fonts.Font) sets font of characters read from keyboard.
"Oberon.SetOffset"
SetOffset (voff: SHORTINT) sets vertical offset of characters read from keyboard.
"Oberon.SetUser"
SetUser (userName, password) sets the current user.
"Oberon.SystemTrack"
SystemTrack (x: INTEGER) : INTEGER returns the left border of
the system track of the display containing the x-coordinate x.
"Oberon.Time"
Time (): LONGINT returns the time in units
of 1/300 seconds since system
start up.
"Oberon.UserTrack"
UserTrack (x: INTEGER) : INTEGER returns the left border of the
user track of the display containing the x-coordinate x.
"Oberon.consume"
id of input message if it is a keyboard input message
"Oberon.track"
id of input message if it is a mouse input message
"Oberon.defocus"
id of Oberon.ControlMsg. It is sent to a viewer
when the focus is passed to another viewer.
"Oberon.mark"
id of Oberon.ControlMsg. Sent to the viewer under the
mouse pointer after the setup key has been pressed.
"Oberon.neutralize"
id of Oberon.ControlMsg. Sent to all viewers
after the user pressed the escape button.
"Oberon.ControlMsg"
Sent to a viewer if the user presses the setup button,
the escape button or changes the focus viewer.
ControlMsg = RECORD (Display.FrameMsg)
id: INTEGER; (* defocus, mark or neutralize *)
X, Y: INTEGER; (* position of mouse *)
"Oberon.CopyMsg"
Sent to a frame if System.Copy was activated
CopyMsg = RECORD (Display.FrameMsg)
F: Display.Frame; (* to store copy if done *)
"Oberon.CopyOverMsg"
Sent to the focus viewer indicating a stretch of
text to be inserted at caret position.
CopyOverMsg*= RECORD (Display.FrameMsg)
text*: Texts.Text;
beg*, end*: LONGINT
"Oberon.Painter"
Callback to draw and fade a marker (see also Oberon.Marker).
Painter = PROCEDURE (x, y: INTEGER);
"Oberon.Marker"
Custom mouse pointer. Contains 2 callbacks to draw and fade the pointer.
Marker = RECORD
Fade, Draw: Painter;
END ;
"Oberon.Cursor"
Structure defining a cursor (e.g. mouse pointer, star).
Cursor = RECORD
marker: Marker; (* shape of cursor *)
on: BOOLEAN; (* TRUE if drawn *)
X, Y: INTEGER; (* current position *)
"Oberon.Handler"
Type for task procedures.
Handler = PROCEDURE;
"Oberon.InputMsg"
Sent to a frame if the user made some input (mouse or keyboard).
InputMsg = RECORD (Display.FrameMsg)
id: INTEGER; (* consume for keyboard or track for mouse input *)
keys: SET; (* set of pressed mouse buttons (2 left, 1 middle, 0 right) *)
X, Y: INTEGER; (* mouse position *)
ch: CHAR; (* entered key *)
fnt: Fonts.Font; (* font of ch *)
col, voff: SHORTINT; (* color and vertical offset of ch *)
"Oberon.ParList"
Pointer TO ParRec
"Oberon.ParRec"
Record describing the parameters for a command.
ParRec = RECORD
vwr: Viewers.Viewer; (* viewer containing parameters *)
frame: Display.Frame; (* frame containing parameters *)
text: Texts.Text; (* text containing parameters *)
pos: LONGINT; (* position in text where paramters start *)
END ;
"Oberon.SelectionMsg"
Broadcasted to all viewers to fetch newest selection. If a viewer has no
current selection it has to leave to message untouched. If it has a selection,
it has to check whether its selection is younger than the one contained in the
message (mySelectionTime > msg.time).
SelectionMsg = RECORD (Display.FrameMsg)
time: LONGINT;
text: Texts.Text;
beg, end: LONGINT;
"Oberon.Task"
POINTER TO TaskDesc
"Oberon.TaskDesc"
Describes a background task.
TaskDesc = RECORD
safe: BOOLEAN; (* FALSE -> removed before execution and reinserted afterwards -> crash causes no problems *)
time: LONGINT; (* time of next activation *)
handle: Handler; (* procedure defining action of task *)
"Oberon.Arrow"
VAR Arrow: Marker denotes the shape of the mouse cursor.
"Oberon.CurCol"
VAR CurCol: SHORTINT is the color of typed in characters.
"Oberon.CurFnt"
VAR CurFnt: Fonts.Font is the font of typed in characters.
"Oberon.CurOff"
VAR CurOff: SHORTINT is the vertical offset of typed in characters.
"Oberon.CurTask"
VAR CurTask: Task is the currently running task. If no task is
running, it contains the latest task that has been running.
"Oberon.FocusViewer"
VAR FocusViewer: Viewers.Viewer is the viewer currently having
the focus. All keyboard input is dispatched to this viewer.
"Oberon.Log"
VAR Log: Texts.Text is the text displayed in the log viewer.
"Oberon.Mouse"
VAR Mouse: Cursor is the representation of the
mouse arrow including its shape and position.
"Oberon.Par"
VAR Par: ParList is a pointer to the currently valid parameters.
"Oberon.Password"
VAR Password: LONGINT is the encoded password of the current user.
"Oberon.Pointer"
VAR Pointer: Cursor is the representation of the
star marker including its shape and position.
"Oberon.Star"
VAR Star: Marker is the shape of the star marker.
"Oberon.User"
VAR User: ARRAY 8 OF CHAR is the name of the current user.
"Out"
Module Out provides a set of basic routines for formatted output of characters,
numbers, and strings. It assumes a standard output stream to which the
symbols are written.
"Out.Open"
Open initializes the output stream. It opens an empty viewer containing the
output stream of module Out. If Open is not called, all output goes to the
Log viewer.
"Out.Close"
Close finalizes the output stream. It closes the output viewer and causes future
output to be written to the Log viewer.
"Out.Char"
Char(ch) writes the character ch to the end of the output stream.
"Out.String"
String(s) writes the null-terminated character sequence s to the end of the
output stream. Any occurrence of the character $ in s is converted to a newline
character.
"Out.Int"
Int(i, n) writes the integer number i to the end of the output stream. If the
textual representation of it requires m characters, i is right adjusted in a field
of Max(n, m) characters padded with blanks at the left end. A positive sign is
not written.
"Out.Real"
Real(x, n) writes the real number x to the end of the output stream using an
exponential form. If the textual representation of x requires m characters
(including a two-digit signed exponent), x is right adjusted in a field of
Max(n, m) characters padded with blanks at the left end. A positive sign of
the mantissa is not written.
"Out.LongReal"
LongReal(x, n) writes the long real number x to the end of the output
stream using an exponential form. If the textual representation of x requires
m characters (including a three-digit signed exponent), x is right adjusted
in a field of Max(n, m) characters padded with blanks at the left end. A
positive sign of the mantissa is not written.
"Out.Ln"
Ln writes an end-of-line symbol to the end of the output stream.
"Out.F"
F(s, x) writes the string s to the end of the output stream as in String(s). The
first occurrence of the character # is replaced by the ordinal number x.
"Out.F2"
F2(s, x, y) behaves like F(s, x). Occurrences of the character # in s are
replaced by the ordinal numbers x and y.
"Out.F3"
F3(s, x, y, z) behaves like F(s, x). Occurrences of the character # in s are
replaced by the ordinal numbers x, y, and z.
"Out.F4"
F4(s, x, y, z, u) behaves like F(s, x). Occurrences of the character # in s are
replaced by the ordinal numbers x, y, z, and u.
"Printer"
Interface to the printer. Offers procedures for printing of text and graphics.
"Printer.Circle"
Circle (x0, y0, r: INTEGER) prints a circle on the
current page at position (x0, y0) and radius r.
"Printer.Close"
Close ends the connection to the printer.
"Printer.ContString"
ContString (VAR s, fname: ARRAY OF CHAR) prints the string s in font
fname starting where the latest ContString or String have ended.
"Printer.Ellipse"
Ellipse (x0, y0, a, b: INTEGER) prints an ellipse
at (x0, y0) with the radiuses a and b.
"Printer.Line"
Line (x0, y0, x1, y1: INTEGER) prints a line from (x0, y0) to (x1, y1).
"Printer.Open"
Open (VAR name, user: ARRAY OF CHAR; password: LONGINT) opens
a connection to the printer name for the user (user, password).
"Printer.Page"
Page (nofcopies: INTEGER) prints the current page nofcopies times.
"Printer.Picture"
Picture (x, y, w, h, mode: INTEGER; adr: LONGINT) prints the picture adr
at position (x, y) in the given size (w, h) and drawing mode mode.
"Printer.ReplConst"
ReplConst(x, y, w, h: INTEGER) fills the specified rectangle on the current page.
"Printer.ReplPattern"
ReplPattern (x, y, w, h, col: INTEGER) fills the specified rectangle on the
current page with the given pattern col (for patterns see also Display1).
"Printer.Spline"
Spline(x0, y0, n, open: INTEGER; VAR X, Y: ARRAY OF INTEGER) prints a spline given
by the arrays X and Y. They both contain n values. If open is 1, an open spline is
drawn. Otherwise the spline is closed. (x0, y0) give a standard move vector
applied to all points.
"Printer.String"
String (x, y: INTEGER; VAR s: ARRAY OF CHAR; VAR fname: ARRAY OF CHAR)
prints a string s in font fname at position (x, y).
"Printer.UseColor"
UseColor (red, green, blue: INTEGER) sets color for all following print commands.
"Printer.UseListFont"
UseListFont (VAR name: ARRAY OF CHAR) assigns the global listing font to the
font name. For all later output with font name, the standard list font is used.
"Printer.PageHeight"
VAR PageHeight: INTEGER is the height of the currently opened printer page.
"Printer.PageWidth"
VAR PageWidth: INTEGER is the width of the currently opened printer page.
"Printer.res"
VAR res: INTEGER is the error code of the latest call to Printer.Open.
"Strings"
provides frequently used string operations. Note that
string assignment and string comparison is already implemented
in the language Oberon.
"Strings.Append"
Append(s, dst) has the same effect as Insert(s, Length(s), dst).
"Strings.Cap"
Cap(s) replaces each lower case letter in s by its upper case equivalent.
"Strings.Delete"
Delete(s, pos, n) deletes n characters from s
starting at position pos (0 <= pos < Length(s)).
If n > Length(s) - pos, the new length
of s is pos.
"Strings.Extract"
Extract(src, pos, n, dst) extracts a substring dst with n characters
from position pos (0 <= pos < Length(src)) in src. If n > Length(src) - pos,
dst is only the part of src from pos to Length(src) - 1. If the size of dst
is not large enough to hold the result of the operation, the result is
truncated so that dst is always terminated with a 0X.
"Strings.Insert"
Insert(src, pos, dst) inserts the string src into the string dst
at position pos (0 <= pos <= Length(dst)). If pos = Length(dst),
src is appended to dst. If the size of dst is not large enough
to hold the result of the operation, the result is truncated
so that dst is always terminated with a 0X.
"Strings.Length"
Length(s) returns the number of characters
in s up to and excluding the first 0X.
"Strings.Pos"
Pos(pat, s, pos) returns the position of the first occurrence of
pat in s after position pos (inclusive). If pat is not found, -1 is returned.
"Strings.Replace"
Replace(src, pos, dst) has the same effect as
Delete(dst, pos, Length(src)) followed by an Insert(src, pos, dst).
"TextFrames"
Module TextFrames has two responsibilities: First, it displays text in
a rectangular area inside a viewer supporting multiple consistent
views on the same text. Second, it reacts to user input such as mouse
clicks and keyboard input. TextFrames is a full text editor.
"TextFrames.MaxTabs"
The maximal number of tabulators in a parc.
"TextFrames.Unit"
Unit is used for device independent coordinates.
"Textframes.delete"
defines the operation code in a self-explanatory manner (see TextFrames.UpdateMsg).
"TextFrames.gridAdj"
gridAdj is a parc option: adjust line height to multiples of the selected line height.
"TextFrames.insert"
defines the operation code in a self-explanatory manner (see TextFrames.UpdateMsg).
"TextFrames.leftAdj"
leftAdj is a parc option: adjust paragraphs to the left
"TextFrames.mm"
mm is used for device independent coordinates.
"TextFrames.pageBreak"
pageBreak is a parc option: enforce a page break before the parc when printing.
"TextFrames.replace"
defines the operation code in a self-explanatory manner (see TextFrames.UpdateMsg).
"TextFrames.rightAdj"
rightAdj is a parc option: adjust paragraphs to the right
"TextFrames.twoColumns"
twoColumns is a parc option: format using two colums
"TextFrames.DisplayMsg"
DisplayMsg = RECORD (Texts.ElemMsg)
prepare: BOOLEAN;
fnt: Fonts.Font;
col: SHORTINT;
pos: LONGINT;
frame: Display.Frame;
X0, Y0: INTEGER;
indent: LONGINT;
elemFrame: Display.Frame;
If ~ prepare, the receiver is asked to display itself (using module Display)
at absolute screen coordinates (X0, Y0). The text attributes set for the
receiving element are given by fnt and col; if set, a vertical offset is
cumulated into coordinate Y0. The field pos is the position of the
element in the hosting text. The hosting frame is available via frame.
Field indent is not valid when ~prepare holds. Finally, an element may
install a subframe by creating a new frame and returning it using field elemFrame.
If prepare, the receiver is asked to prepare itself for being displayed.
The text attributes set for the receiving element are given by fnt and
col; if set, a vertical offset is cumulated into coordinate Y0. The field
pos is the position of the element in the hosting text. Field indent
indicates the space (in units) already taken in the currently casted line.
Field Y0 is set to the base line offset that will be applied to the element.
(This value may be changed by the element to affect the resulting base
line offset and line heights). Fields frame, X0 and elemFrame
are undefined if prepare holds.
"TextFrames.FocusMsg"
FocusMsg = RECORD (Texts.ElemMsg)
focus: BOOLEAN;
elemFrame, frame: Display.Frame
The receivers subframe is about to be focussed or defocussed, depending
on the value of focus. The subframe is indicated by elemFrame, the host frame by frame.
"TextFrames.Frame"
Frame = POINTER TO FrameDesc
A text frame is an instance of the abstract type Frame. The text frame
is an active frame intended to be installed either as the menu frame
or the main frame in a menu viewer. The text frame implements the
standard Oberon editor. Its properties are a displayed text (text and org),
a background color (col), line spacing information (lsp), a margin
(left, right, top, and bot), a selection (time, sel, selbeg, and selend),
a caret (car and carloc), and a mark (mark and markH).
"TextFrames.FrameDesc"
FrameDesc = RECORD
text: Texts.Text;
org: LONGINT;
col, left, right, top, bot, markH, barW: INTEGER;
time: LONGINT;
hasCar, hasSel, showsParcs: BOOLEAN;
carloc, selbeg, selend: Location;
focus: Display.Frame;
(see TextFrames.Frame)
"TextFrames.Location"
Location = RECORD
org, pos: LONGINT;
x, y, dx, dy: INTEGER;
The auxiliary type Location describes the place and properties of a given
character, where org is the position in the text of the first displayed character
in the line which contains the located character, pos is the position in the text
of the located character, dx, dy are width and height of the located character,
x, and y are the relative positions of the located character within the frame.
"TextFrames.InsertElemMsg"
InsertElemMsg = RECORD (Display.FrameMsg)
e: Texts.Elem
An InsertElemMsg is sent to a frame to insert the text element e in it.
"TextFrames.NotifyMsg"
NotifyMsg = RECORD (Display.FrameMsg)
frame: Display.Frame
A message derived from TextFrames.NotifyMsg has the additional property that
the delegating frame adds its identity to the message field frame.
"TextFrames.Parc"
POINTER TO TextFrames.Parc
Parcs are paragraph controls. The most important properties are left (distance
from (f.X + f.left); in units), first (first line indentantion from p.left; in units),
width (parc width; in units), lead (distance to previous line; in units),
lsp (line spacing of text after p; in units), dsr (descender of text after p; in units).
"TextFrames.ParcDesc"
ParcDesc = RECORD (Texts.ElemDesc)
left, first, width, lead, lsp, dsr: LONGINT;
opts: SET;
nofTabs: INTEGER;
tab: ARRAY 32 OF LONGINT;
see TextFrames.Parc
"TextFrames.TrackMsg"
TrackMsg = RECORD (Texts.ElemMsg)
X, Y: INTEGER;
keys: SET;
fnt: Fonts.Font;
col: SHORTINT;
pos: LONGINT;
frame: Display.Frame;
X0, Y0: INTEGER;
The receiving element, based at screen coordinates (X0, Y0) is asked
to handle a mouse click at screen coordinate (X, Y) with keys pressed.
The text attributes set for the receiving element are given by fnt and col;
if set, a vertical offset is cumulated into coordinate Y0. The field pos is the
position of the element in the hosting text.
The hosting frame can be referred to via frame.
"TextFrames.UpdateMsg"
UpdateMsg = RECORD (Display.FrameMsg)
id: INTEGER;
text: Texts.Text;
beg, end: LONGINT;
The update message sent by NotifyDisplay has the properties id
(the message identifier TextFrames.replace - TextFrames.insert -
TextFrames.delete), text (the changed text) and the stretch [beg, end) which is changed.
"TextFrames.barW"
barW is the width of the standard scroll bar.
"TextFrames.bot"
left, right, top, bot are the standard margins.
"TextFrames.defParc"
defParc is the defined Parc.
"TextFrames.left"
left, right, top, bot are the standard margins.
"TextFrames.menuH"
menuH is the standard height of the menu frame.
"TextFrames.right"
left, right, top, bot are the standard margins.
"TextFrames.top"
left, right, top, bot are the standard margins.
"TextFrames.Handle"
Handle (f: Frame; VAR msg: Display.FrameMsg) is the default message handler
for text frames. It is automatically installed in a frame allocated with
TextFrames.NewText or TextFrames.NewMenu and basically reacts to resize
messages, input messages (mouse, keyboard) and update messages. If a new
handler is installed in f.handle by the user, this handler should delegate
all messages that it does not want to handle to procedure Handle.
"TextFrames.LocateChar"
TextFrames.LocateChar (f: Frame; x, y: INTEGER; loc: Location) retrieves the
location loc of a char defined by its relative position x, y within the frame f.
"TextFrames.LocateLine"
TextFrames.LocateLine (f: Frame; y: INTEGER; loc: Location) retrieves the
location loc of a line defined by its relative position y within the frame f.
"TextFrames.LocatePos"
TextFrames.LocatePos (f: Frame; pos: LONGINT; loc: Location) retrieves the
location loc of a char defined by its relative position pos within the frame f.
"TextFrames.LocateWord"
TextFrames.LocatePos (f: Frame; x, y: INTEGER; loc: Location) retrieves the
location loc of a word defined by its relative position x, y within the frame f.
"TextFrames.Mark"
Mark (f: Frame; mark: INTEGER) marks the text frame f specified by
mark (mark < 0: arrow mark, mark = 0: no mark, mark > 0: position mark).
"TextFrames.NewMenu"
NewMenu (name, commands: ARRAY OF CHAR): Frame returns a new text
frame that can be used as the menu frame of a viewer. It contains the
viewer name n and a list of commands c. The frame is not yet displayed
on the screen. The usual way to display it is to install it in a viewer
using the procedure MenuViewers.New.
"TextFrames.NewText"
NewText (t: Texts.Text; pos: LONGINT): Frame returns a new text frame with
the text t being installed so that it will be displayed starting at position pos.
All other fields of the frame are initialized to default values. The frame is not
yet displayed on the screen. The usual way to display it is to install it in a
viewer using the procedure MenuViewers.New.
"TextFrames.NotifyDisplay"
NotifyDisplay (t: Texts.Text; id: INTEGER; beg, end: LONGINT) is the default
notifier for texts. It is automatically installed in a text allocated with
procedure Text and is called from procedures of module Texts whenever
the text is modified. It then sends an UpdateMsg to all viewers on the
screen. This message is handled by the handlers of those frames
that show the modified text.
"TextFrames.Open"
Open (f: Frame; t: Texts.Text; pos: LONGINT) opens text frame f. The text t
is linked with f and positioned such that the character with position pos
is displayed at the top left corner of the frame.
"TextFrames.ParcBefore"
ParcBefore (t: Texts.Text; pos: LONGINT; p: Parc; beg: LONGINT) retrieves the
parc p and its position beg responsible for position pos in text t.
"TextFrames.Pos"
Pos (f: Frame; x, y: INTEGER) returns the text position of the character in
frame f that corresponds to the frame coordinates x, y relative to
the left bottom margin of f.
"TextFrames.RemoveCaret"
RemoveCaret (f: Frame) removes the caret from frame f.
"TextFrames.RemoveSelection"
RemoveSelection (f: Frame) removes the selection from frame f.
"TextFrames.SetCaret"
SetCaret (f: Frame; pos: LONGINT) sets the caret to position pos in frame f.
"TextFrames.SetSelection"
SetSelection (f: Frame; beg, end: LONGINT) sets the selection within
frame f to the interval [beg..end[.
"TextFrames.Show"
Show (f: Frame; pos: LONGINT) scrolls the text in the already visible
frame f such that it is shown from the position pos.
"TextFrames.Text"
Text (fn: ARRAY OF CHAR): Texts.Text returns a new text initialized
with the contents of the file fn. If fn = '' an empty text is returned.
Texts.NotifyDisplay is installed as a notifier of the new text.
"TextFrames.TrackCaret"
TrackCaret (f: Frame; x, y: INTEGER; keys: SET) tracks the caret in frame
f from starting point x, y. As long as any key is pressed, the caret follows
the mouse cursor. On release of all keys, the caret is set in place.
Any mouse keys pressed during tracking are reported in keys.
"TextFrames.TrackLine"
TrackLine (f: Frame; x, y: INTEGER; org: LONGINT; kexs: SET) tracks lines
in text frame f from starting point x, y. As long as any key is pressed,
the line pointed at with the cursor is underlined. On release of all keys,
the underlining is removed. The position of the first character of the line
which was underlined last is returned in parameter org. Any mouse keys
pressed during tracking are reported in keys.
"TextFrames.TrackSelection"
TrackSelection (f: Frame; x, y: INTEGER; keys: SET) tracks the selection in text
frame f starting at x, y. As long as any key is pressed, the selection follows
the mouse cursor. On release of all keys, the selection is set. Any mouse keys
pressed during tracking are reported in keys.
"TextFrames.TrackWord"
TrackWord (f: Frame; x, y: INTEGER; pos: LONGINT; keys: SET) tracks words in
text frame f from starting point x, y. As long as any key is pressed, the word
pointed at with the cursor is underlined. On release of all keys, the underlining
is removed. The position of the first character of the word which was underlined
last is returned in paramter pos. Any mouse keys pressed during
tracking are reported in keys.
"TextPrinter"
Module TextPrinter offers procedures for printing of texts including headers on each page.
"TextPrinter.Unit"
Printer units for a 300 dpi printer.
"TextPrinter.PrintMsg"
Message sent to a text element indicating that it should print itself. If the
record filed prepare is TRUE, the element has to ensure that its record fields W and H are
set correct. IF prepare is FALSE it has to print itself at the position X0, Y0.
PrintMsg = RECORD (Texts.ElemMsg)
prepare: BOOLEAN;
indent: LONGINT; (* prepare => width already consumed in line, in units *)
fnt: Fonts.Font; (* font which sould be used in elements containing text *)
col: SHORTINT; (* suggestion for printing color *)
pos: LONGINT; (* position of element in text *)
X0, Y0, pno: INTEGER; (* position on page and number of current page *)
"TextPrinter.DX"
DX (fno: SHORTINT; ch: CHAR): LONGINT returns the width dx of the
given char ch in the given font fno multiplied with TextPrinter.Unit.
"TextPrinter.Font"
Font (fno: SHORTINT): Fonts.Font returns the
font corresponding to the given font number.
"TextPrinter.FontNo"
FontNo (fnt: Fonts.Font): SHORTINT returns the number of the specified font.
"TextPrinter.Get"
Get (fno: SHORTINT; ch: CHAR; VAR dx, x, y, w, h: LONGINT) fetches the
printer dimensions of a character ch in the font fno on the printer into the
variables dx, x, y, w, h.
"TextPrinter.GetChar"
GetChar (fno: SHORTINT; targetUnit: LONGINT; ch: CHAR; VAR pdx: LONGINT;
VAR dx, x, y, w, h: INTEGER; VAR pat: LONGINT)
gets the metrics of a character as printed. It is not used by the system. It takes
the following in and out parameters:
fno(in): Number of font (see also TextPrinter.Font)
targetUnit(in): resolution of printer (see also TextPrinter.Unit)
ch(in): character of interest
pdx(out): width of character in printer units multiplied by TextPrinter.Unit
dx(out), w(out): width of character in printer units
x(out), y(out) offset of character in printer units
h(out) height of character in printer units
"TextPrinter.InitFonts"
InitFonts initialises the printer fonts. Should be called before printing characters.
"TextPrinter.PlaceBody"
PlaceBody (bodyX, bodyY, bodyW, bodyH: INTEGER; T: Texts.Text; VAR pos: LONGINT;
pno: INTEGER; place: BOOLEAN)
prints T starting from pos on the current page. It prints until the rectangle defined
by bodyX, bodyY, bodyW and bodyH is filled. The first character not printed is
returned in pos. The two additional parameters define the current page number
(pno) and if the output should be visible (place = TRUE).
"TextPrinter.PlaceHeader"
PlaceHeader (headerX, headerY, headerW, pno: INTEGER; fnt: Fonts.Font;
VAR header: ARRAY OF CHAR; alt: BOOLEAN)
prints a header on the current page. headerX, headerY and headerW define the
position of the header string header (printed in the font fnt). If alt is TRUE the
header is printed alternatively on the left and on the right border.
"TextPrinter.PrintDraft"
PrintDraft (t: Texts.Text; header: ARRAY OF CHAR; copies: INTEGER) prints a text in
draft mode. Every page is printed copies times. Each page has a header consisting
of the string header and a page number.
"Texts"
Provides ASCII character streams with fonts, colors, and vertical offsets as
well as procedures to read, write, scan, and edit them.
"Texts.Char"
Class of the scanned symbol (see Texts.Scanner).
"Texts.ElemChar"
Class of the scanned symbol (see Texts.Scanner).
"Texts.Int"
Class of the scanned symbol (see Texts.Scanner).
"Texts.Inval"
Class of the scanned symbo (see Texts.Scanner).
"Texts.LongReal"
Class of the scanned symbol (see Texts.Scanner).
"Texts.Name"
Class of the scanned symbol (see Texts.Scanner).
"Texts.Real"
Class of the scanned symbol (see Texts.Scanner).
"Texts.String"
Class of the scanned symbol (see Texts.Scanner).
"Texts.delete"
defines the operation code in a self-explanatory manner.
"Texts.insert"
defines the operation code in a self-explanatory manner.
"Texts.load"
possible value of Texts.FilesMsg.id.
"Texts.replace"
defines the operation code in a self-explanatory manner.
"Texts.store"
possible value of Texts.FilesMsg.id.
"Texts.Buffer"
Buffer= POINTER TO BufDesc
A buffer is an intermediate data structure holding a piece of text. It must be
initialized with Texts.OpenBuf, it can be filled with Texts.Save or Texts.Copy,
and it can be inserted into another text with Texts.Insert and Texts.Append.
The component len determines the buffer length.
"Texts.BufDesc"
BufDesc = RECORD len: LONGINT END
see Texts.Buffer
"Texts.CopyMsg"
CopyMsg = RECORD (Texts.ElemMsg)
e: Elem
A CopyMsg (extension of Texts.ElemMsg) is sent to a text element to get a
copy of it (contained in the propery e).
"Texts.Elem"
Elem = POINTER TO ElemDesc
The base type of a text element. Its properties are W, H (width and heigth
of the text element) and handle (a procedure which reacts to messages of
type Texts.ElemMsg).
"Texts.ElemDesc"
ElemDesc = RECORD
W, H: LONGINT;
handle: Handler;
see Texts.Elem
"Texts.ElemMsg"
ElemMsg = RECORD END
The abstract base type of the element messages (see Texts.CopyMsg,
Texts.FileMsg and Texts.IdentifyMsg). Each text element must react
to such messages.
"Texts.FileMsg"
FileMsg = RECORD (ElemMsg)
id: INTEGER;
pos: LONGINT;
r: Files.Rider;
A FileMsg (extension of Texts.ElemMsg) is sent to a text element to
load (id = Texts.load or store (id = Texts.store) its state using the
rider r. The state of the base type Texts.ElemDesc (W, H) is automatically
loaded and stored. The field pos is the position of the element in the
hosting text.
"Texts.Handler"
Handler = PROCEDURE (e: Elem; VAR msg: ElemMsg);
The type of the handler for text elements.
"Texts.IdentifyMsg"
IdentifyMsg = RECORD (ElemMsg)
mod, proc: ARRAY 32 OF CHAR
An IdentifyMsg (extension of Texts.ElemMsg) is sent to a text element
to get the name of its allocator (property mod: module,
property proc: procedure).
"Texts.Notifier"
Notifier = PROCEDURE (t: Text; op: INTEGER; beg, end: LONGINT);
The type of text property notify.
"Texts.Reader"
Reader = RECORD
eot: BOOLEAN;
fnt: Fonts.Font;
col, voff: SHORTINT;
elem: Elem;
A reader can be used to read a text and its attributes characterwise.
It can be set to a specific text position (Texts.OpenReader) from where
characters can be read with the procedure Texts.Read. Procedure
Texts.Pos returns a reader's position. The components fnt, col and
off determines the font, color and vertical offset of the read character.
If an element is read the property elem is defined. When an attempt is
made to read beyond the end of the text, the component eot is set to TRUE.
"Texts.Scanner"
Scanner = RECORD (Reader)
nextCh: CHAR;
line, class: INTEGER;
i: LONGINT;
x: REAL;
y: LONGREAL;
c: CHAR;
len: SHORTINT;
s: ARRAY 256 OF CHAR;
A scanner is an extension of a Texts.Reader. A scanner provides a convenient
way to read symbols such as numbers, strings, or names from a text. It can
be set to a text position (Texts.OpenScanner) from where symbols can be
read sequentially with Texts.Scan. The fields of a scanner hold the kind of
the recognized symbol as well as its value. Which components of the scanner
are set, depends on the read symbol (determined by the component class).
Texts.Name (ident {'.' ident}) can be identified by len and s
Texts.String ('' {char} '') can be identified by len and s
Texts.Int (['+'|'-'] (digit {digit} | digit {hexdigit} 'H')) can be identified by i
Texts.Real (['+'|'-'] digit {digit} '.' digit {digit} ['E' ['+'|'-'] digit {digit}])
can be identified by x
Texts.LongReal (['+'|'-'] digit {digit} '.' digit {digit} ['D' ['+'|'-'] digit {digit}])
can be identified by y
Texts.Char (any other character) can be identified by c
Further properties of the scanner are nextCh (the character in the text which
immediately follows a scanned symbol) and line (the line number of
the scanned symbol).
"Texts.Text"
Texts.Text = POINTER TO Texts.TextDesc
A text is a sequence of characters with fonts, colors, and vertical offsets.
The length of a text is only limited by the available amount of disk space.
Character positions in a text start at 0. Whenever a text is modified, its
notifier procedure is called which usually sends an appropriate update
message to all frames showing this text (see TextFrames.UpdateMsg).
Texts can be read with readers or scanners, written with writers, and
edited with Texts.Insert, Texts.Delete and Texts.Append. Fonts, colors, and
vertical offsets can be read with readers and modified with Texts.ChangeLooks.
Texts can be initialized with Texts.Open or Texts.Load. To initialize a text that
is to be displayed in a text frame, use the procedure TextFrames.Text. The
component len determines the text length. The component notify of type
Texts.Notifier is automatically called after every modification of this text.
"Texts.TextDesc"
TextDesc = RECORD
len: LOGINT;
notify: Notifier;
see Texts.Text
"Texts.Writer"
Writer = RECORD
buf: Buffer;
fnt: Fonts.Font;
col, voff: SHORTINT;
A writer represents a text buffer to which formatted output can be
appended with the procedures Texts.Write, Texts.WriteString, etc. The writer's
buffer buf can then be inserted into a text using Texts.Insert or Texts.Append.
The components fnt, col and off determines the font, color and vertical offset
of the written character.
"Texts.Append"
Append (t: Text; b: Buffer) inserts buffer b into text t at the the end of the text.
b is emptied after this operation (identical to Texts.Insert (t, t.len, b)).
"Texts.ChangeLooks"
ChangeLooks (t: Text; beg, end: LONGINT; sel: SET; fnt: Fonts.Font; col, voff: SHORTINT)
can be used to modify the font, color and vertical offset of the interval [beg..end[
of t. If (0 IN sel) the font fnt is applied, if (1 IN sel) the color col is applied, and
if (2 IN sel) the vertical offset voff is applied.
"Texts.Close"
Close (t: Text; fn: ARRAY OF CHAR) stores the text t on the file fn. t can still be
used after a call to Texts.Close.
"Texts.Copy"
Copy (sb, db: Buffer) appends a copy of sb to db (db must already be
initialized with Texts.OpenBuf).
"Texts.CopyElem"
CopyElem (se, de: Elem) copies all fields - defined in the base type ElemDesc - from se to de.
"Texts.Delete"
Delete (t: Text; beg, end: LONGINT) deletes the interval [beg..end[ from t.
"Texts.ElemBase"
ElemBase (e: Elem): Text returns the base text of the text element e.
"Texts.ElemPos"
ElemPos (e: Elem): LONGINT returns the position of the text element e in
its base text.
"Texts.Insert"
Insert (t: Text; pos: LONGINT; b: Buffer) inserts buffer b into text t at position pos.
b is emptied after this operation.
"Texts.Load"
Load (r: Files.Rider, t: Text) reads a text from rider r and returns it in t (t must
already be allocated with NEW).
"Texts.Open"
Open (t: Text; fn: ARRAY 32 OF CHAR) reads a text from the file fn and returns
it in t (t must already be allocated with NEW). IF fn = '' an empty text is returned.
"Texts.OpenBuf"
OpenBuf (b: Buffer) initializes b to be empty
(b must already be allocated with NEW).
"Texts.OpenReader"
OpenReader (r: Reader; t: Text; pos: LONGINT) sets the reader r to
position pos in text t.
"Texts.OpenScanner"
OpenScanner (s: Scanner; t: Text; pos: LONGINT) sets the scanner s to
position pos in text t.
"Texts.OpenWriter"
OpenWriter (w: Writer) initializes w to be empty.
"Texts.Pos"
Pos (r: Reader) returns the position of r in its associated text.
"Texts.Read"
Read (r: Reader; ch: CHAR) reads a character ch from the reader r and
advances the reader's position by 1. r.fnt, r.col, and r.voff represent the
font, color and vertical offset of the read character. When an attempt is
made to read beyond the end of the text, r.eot is set to TRUE
"Texts.ReadElem"
Read (r: Reader) reads the next element r.elem from the reader r. r.fnt,
r.col, and r.voff represent the font, color and vertical offset of the read
character. When an attempt is made to read beyond the end of the
text, r.eot is set to TRUE
"Texts.ReadPrevElem"
Read (r: Reader) reads the previous element r.elem from the reader r.
r.fnt, r.col, and r.voff represent the font, color and vertical offset of the
read character. When an attempt is made to read beyond the end
of the text, r.eot is set to TRUE
"Texts.Recall"
Recall (b: Buffer) recalls the most recently deleted stretch of text in
buffer b. There is no need to open the buffer prior to passing it as actual parameter.
"Texts.Save"
Save (t: Texts; beg, end: LONGINT; b: Buffer) appends a copy of the interval
[beg..end[ of t to the buffer b (b must already be initialized with Texts.OpenBuf).
"Texts.Scan"
Scan (s: Scanner) recognizes the next symbol in the text and moves the
scanner position at the end of this symbol. The kind of the symbol is stored
in s.class and its value is stored according to the following list:
Texts.Name (ident {'.' ident}) can be identified by len and s
Texts.String ('' {char} '') can be identified by len and s
Texts.Int (['+'|'-'] (digit {digit} | digit {hexdigit} 'H')) can be identified by i
Texts.Real (['+'|'-'] digit {digit} '.' digit {digit} ['E' ['+'|'-'] digit {digit}])
can be identified by x
Texts.LongReal (['+'|'-'] digit {digit} '.' digit {digit} ['D' ['+'|'-'] digit {digit}])
can be identified by y
Texts.Char (any other character) can be identified by s.c
s.nextCh contains the character immediately following the
recognized symbol. s.line counts the end-of-line characters from the
position to which the scanner was set by OpenScanner.
"Texts.SetColor"
SetColor (w: Writer; col: SHORTINT) sets the color of the writer w to col.
"Texts.SetFont"
SetFont (w: Writer; fnt: Fonts.Font) sets the font of the writer w to fnt.
"Texts.SetOffset"
SetOffset (w: Writer; voff: SHORTINT) sets the vertical offset of the writer w to voff.
"Texts.Store"
Store (r: Reader; t: Text) stores the text t to rider r.
"Texts.Write"
Write (w: Writer; ch: CHAR) writes the character ch to w.
"Texts.WriteDate"
WriteDate (w: Writer; t, d: LONGINT) writes the date - defined by t and d - to w.
The parameters t (time) and d (date) are in the format defined by the procedure
Oberon.GetTime. The format is "dd.mm.yy hh:mm:ss" with dd: day, mm: month,
yy: year, hh: hour, mm: minute and ss: second.
All two digit numbers with leading zeros if necessary.
"Texts.WriteElem"
WriteElem (w: Writer; e: Elem) writes the text element e to w.
"Texts.WriteHex"
WriteHex (w: Writer; x: LONGINT) writes the integer number x as 8 hexadecimal digits to w.
"Texts.WriteInt"
WriteInt (w: Writer; x, n: LONGINT) writes the integer number x to w.
x is right-adjusted in a field of n characters padded with blanks.
If n is too small, the field width is extended as necessary.
"Texts.WriteLn"
WriteLn (w: Writer) writes an end-of-line character to w.
"Texts.WriteLongReal"
WriteLongReal (w: Writer; x: LONGREAL; n: INTEGER) writes the long real
number x to w. x is right adjusted in a field of n characters padded with
blanks. If n is too small, the field width is extended as necessary.
"Texts.WriteLongRealHex"
WriteLongRealHex (w: Writer; x: LONGREAL) writes the long real
number x as 8 hexadecimal digits to w.
"Texts.WriteReal"
WriteReal (w: Writer; x: REAL; n: INTEGER) writes the real number x to w.
x is right adjusted in a field of n characters padded with blanks.
If n is too small, the field width is extended as necessary.
"Texts.WriteRealFix"
WriteRealFix (w: Writer; x: REAL; n, k: INTEGER) writes the fixed-point
decimal character representation of x, right justified in a field of n places
with k places for the decimal fraction to w.
The field size is adjusted if chosen too small.
"Texts.WriteRealHex"
WriteRealHex (w: Writer; x: REAL) writes the real number x as 8 hexadecimal digits to w.
"Texts.WriteString"
WriteString (w: Writer, s: ARRAY OF CHAR) writes the string s to w.
"Trace"
provides means for switching debugging output on or off.
"Trace.switch"
An array of boolean switches that can be set or reset by commands.
The switches can be used to control trace output.
"Trace.Clear"
resets all switches to FALSE
"Trace.Reset"
Sets the switch specified by the numeric
command argument to TRUE.
"Trace.Set"
Resets the switch specified by the numeric
command argument to FALSE.
"Trace.Show"
lists all switches that are TRUE
"Types"
Module Types offers possibilites to administrate the list of defined Types.
It works with type SYSTEM.PTR. Variables of any pointer type may be
assigned to variables of this type.
"Types.Type"
Type = POINTER TO TypeDesc
This type defines an Oberon Type defined in module module with name name.
"Types.TypeDesc"
TypeDesc = RECORD
name: ARRAY 32 OF CHAR;
module: Modules.Module;
see Types.Type
"Types.BaseOf"
BaseOf (t: Type; level: INTEGER): Type returns the base type t with the
extension level level. If level = 0 the base type is returned.
"Types.LevelOf"
LevelOf (t: Type): INTEGER returns the extension level of type t.
"Types.NewObj"
NewObj (VAR o: SYSTEM.PTR; t: Type) allocates a new object of type t and retrieves it in o.
"Types.This"
This (mod: Modules.Module; name: ARRAY OF CHAR): Type returns
the type with name name defined in module mod.
"Types.TypeOf"
TypeOf (o: SYSTEM.PTR): Type returns the dynamic type of of o.
"Viewers"
Module Viewers provides a logical model of the display with tracks
(vertical stripes) and viewers (windows). Viewers completely tile
the display.
"Viewers.restore"
id of a ViewerMsg. Causes viewer to be restored within
its boundaries (X, Y, W, H).
"Viewers.modify"
id of a ViewerMsg. Causes the viewer to change its bottom.
"Viewers.suspend"
id of a ViewerMsg. Sent when a viewer is closed
or overlaid.
"Viewers.Viewer"
POINTER TO RECORD (Display.FrameDesc)
state: INTEGER
state > 1: viewer is displayed (not a filler)
state = 1: viewer is a filler
state = 0: viewer is closed
state = -1: viewer is a suspended filler
state < -1: viewer is suspended (not a filler)
"Viewers.ViewerMsg"
RECORD (Display.FrameMsg)
id, X, Y, W, H, state: INTEGER
Sent when the display configuration changes.
"Viewers.minH"
Minimal viewer height.
"Viewers.curW"
width of logical display (sum of all track widths).
"Viewers.Broadcast"
Broadcast(m) sends the message m to all visible viewers on the screen.
"Viewers.Change"
Change(v, y) moves the top of v to y (if the new viewer height
is greater than minH) and sends the viewer above v a modify
message.
"Viewers.Close"
Close(v) closes viewer v. If v is the last viewer in a track (besides the
filler), the track is closed, too.
"Viewers.CloseTrack"
CloseTrack(x) closes the track that contains x (only if it is an overlay).
"Viewers.InitTrack"
InitTrack(w, h, filler) adds a new track to the right of the
existing tracks. Used during system initialization.
"Viewers.Locate"
see the User Guide.
"Viewers.Next"
Next(v) returns the viewer above v. The topmost viewer of a track
is a filler (v.state = 1).
"Viewers.Open"
Open(v, x, y) opens viewer v so that the point (x, y) determines the top
of the viewer (if the viewer is not smaller than minH). The viewer above
v is sent an update message. Open does not display the frames in v.
"Viewers.OpenTrack"
OpenTrack(x, w, filler) creates an overlay track that covers all tracks
overlapping with the line (x, x+w). Overlayed viewers are suspended.
"Viewers.Recall"
Recall(v) returns the last viewer previously closed by Close(v) or NIL
if no such viewer exists.
"Viewers.This"
This(x, y) returns the viewer containing the point (x, y)
"XYPlane"
Offers a primitive pixel based output mechanism. Useful
mostly for demonstrations and student exercises.
"XYPlane.Open"
Opens a viewer and initializes the drawing plane. The position and dimension
of the opened viewer is stored in the global variables X, Y, W and H.
"XYPlane.Clear"
Clears the drawing plane opened with Open.
"XYPlane.Dot"
Dot (x, y, mode) draws the dot at position (x, y).
mode may be either draw
or erase.
"XYPlane.IsDot"
IsDot (x, y: INTEGER): BOOLEAN returns TRUE if the
dot at position (x, y)
is drawn; otherwise FALSE.
"XYPlane.Key"
Key (): CHAR reads the keyboard. If, previous to invocation, a key has been
pressed, its character value is returned. Otherwise the result is 0X.
"XYPlane.draw"
Drawing mode for the procedure Dot.
"XYPlane.erase"
Drawing mode for the procedure Dot.
"XYPlane.H"
Height of drawing plane.
"XYPlane.W"
Width of drawing plane.
"XYPlane.X"
Left offset of drawing plane.
"XYPlane.Y"
Bottom offset of drawing plane.
"XYPlane.XYhandle"
XYhandle (F: Display.Frame; VAR M: Display.FrameMsg)
handle of the drawing plane frame.